//
//  MCOrderListFatherModel.swift
//  StoreManage
//
//  Created by MC on 2017/12/26.
//  Copyright © 2017年 MC. All rights reserved.
//

import UIKit

class MCOrderListFatherModel: NSObject {

    //  到店取  -》  自提  -》 status 4 6 核销   未核销
    
    @objc var orderSn               : String = ""
    @objc var status                : NSNumber = 0   // 2待发货  3待收货  4已完成  5已取消 6交易关闭  7已关闭
    @objc var deliveryWay           : NSNumber = 0   // 3快递送  2到店取  1及时送
    @objc var isSelfDelivery        : NSNumber = 0
  
    // 联系人信息
    @objc var linkMan               : String = ""
    @objc var mobile                : String = ""
    @objc var province              : String = ""
    @objc var city                  : String = ""
    @objc var area                  : String = ""
    @objc var address               : String = ""
    @objc var billheader            : String = ""
    @objc var billMoney             : Int    = 0
    @objc var remark                : String = ""

    
    // 创建时间
    @objc var createTime            : String = ""
    @objc var totalQuantity         : NSNumber = 0  // 购买商品总数

    @objc var totalFee              : NSNumber = 0  // 实付金额 （包含运费）
    @objc var orderAmount           : NSNumber = 0  // 订单总金额
    @objc var promotiondiscount     : NSNumber = 0  // 优惠券的金额
    @objc var freight               : NSNumber = 0  // 运费
    
    @objc var salesman              : String = ""   // 销售人
    @objc var totalCommision        : NSNumber = 0  // 子订单佣金


    
    
    
    // 商品详情
    @objc var listBaOrderDetailVo   : NSArray = [] {
        didSet {
            let arrayM = NSMutableArray()
            
            for dict in listBaOrderDetailVo {
                let model = MCOrderListModel()
                model.setValuesForKeys(dict as! [String : Any])
                arrayM.add(model)
            }
            listBaOrderDetailVo = arrayM.copy() as! NSArray
        }
    }
    
    // 订单搜索里面的
    @objc var listOrderDetail  : NSArray = [] {
        didSet {
            let arrayM = NSMutableArray()
            
            for dict in listOrderDetail {
                let model = MCOrderListModel()
                model.setValuesForKeys(dict as! [String : Any])
                arrayM.add(model)
            }
            listOrderDetail = arrayM.copy() as! NSArray
        }
    }
    
    
    
    override func setValue(_ value: Any?, forUndefinedKey key: String) { }
}
